﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace CKSE.ViewModels
{
    public class WorkspaceViewModel : ViewModelBase
    {
        #region Events
        public event EventHandler RequestClose;
        #endregion

        #region Fields
        ICommand _closeCommand;
        #endregion

        #region Properties
        public ICommand CloseCommand
        {
            get
            {
                if (_closeCommand == null)
                {
                    _closeCommand = new RelayCommand(x => Close());
                }
                return _closeCommand;
            }
        }
        #endregion

        #region Life Cycle
        public WorkspaceViewModel()
        {

        }
        #endregion

        #region Methods
        public void Close()
        {
            EventHandler handler = RequestClose;
            if (handler != null)
            {
                handler(this, null);
            }
        }
        #endregion
    }
}
